cmake_minimum_required(VERSION 3.16)
project(ollama_chat LANGUAGES CXX)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

# Find nlohmann_json
# Ubuntu/Debian: sudo apt install nlohmann-json3-dev
find_package(nlohmann_json 3.2.0 REQUIRED)

# Find libcurl
find_package(CURL REQUIRED)

# Create executable
add_executable(ollama_chat
    main.cpp
    ollama_client.cpp
)

# Link libraries
target_link_libraries(ollama_chat
    PRIVATE
    nlohmann_json::nlohmann_json
    CURL::libcurl
)

target_include_directories(ollama_chat PRIVATE 
    ${CURL_INCLUDE_DIRS}
    ${JSONCPP_INCLUDE_DIRS}
)